<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 
        根本区别在于：
            v-if 显示与隐藏通过增加与删除DOM元素
            v-show 显示与隐藏通过控制元素中属性display:none 实现
     -->
    <div id="app">
        <div v-if="isTrue">v-if显示内容</div>
        <div v-show="isTrue">v-show显示内容</div>
    </div>
    <script src="../../js/vue.js"></script>
    <script>
        const dcl = {
            data() {
                return {
                    isTrue: true
                }
            }
        }
        Vue.createApp(dcl).mount('#app');
    </script>
</body>

</html>